################ -*- mode: Makefile; -*- #############################
##                
## Copyright (C) 2004,  Karlsruhe University
##                
## File path:     Makeconf.mips64
##                
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions
## are met:
## 1. Redistributions of source code must retain the above copyright
##    notice, this list of conditions and the following disclaimer.
## 2. Redistributions in binary form must reproduce the above copyright
##    notice, this list of conditions and the following disclaimer in the
##    documentation and/or other materials provided with the distribution.
## 
## THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
## ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
## ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
## FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
## OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##                
## $Id: Makeconf.mips64,v 1.1 2004/05/25 19:21:51 skoglund Exp $
##                
######################################################################

CFLAGS_mips64	+= -O3 -G 0 -mlong64 -mno-abicalls -non_shared -msplit-addresses

# Mips64 Compile Note: cvansch - UNSW
#  GNU GCC/Binutils are broken for anything but ABI=o64
#  We support the ABI=64 calling convention
#  GCC is not broken for ABI=64 however GAS and LD are.
#  Temporary solution is to let GCC generate ABI=64 code
#  and pass ABI=o64 to the assembler.
#  This works consistantly with diferent GCC/binutils
#  versions and has a side effect of producing optimised
#  address calculation.
ifeq ($(PLATFORM),erpcn01)
LDFLAGS_mips64   += -EL
VFLAGS += -EL
CFLAGS_rc64574  += -EL -mcpu=r5000 -mips4 -mabi=64 -Wa,-mabi=o64
ASMFLAGS_mips64  += $(CFLAGS_mips64) $(CFLAGS_rc64574)
endif

ifeq ($(PLATFORM),u4600)
LDFLAGS_mips64   += -EB
VFLAGS += -EB
CFLAGS_r4x00  += -EB -mcpu=r4000 -mips3 -mabi=64 -Wa,-mabi=o64
ASMFLAGS_mips64  += $(CFLAGS_mips64) $(CFLAGS_r4x00)
endif

ifeq ($(PLATFORM),sb1)
LDFLAGS_mips64   += -EB
VFLAGS += -EB
CFLAGS_sb1  += -EB -mcpu=sb1 -mips64 -mabi=64 -Wa,-mabi=o64
ASMFLAGS_mips64  += $(CFLAGS_mips64) $(CFLAGS_sb1)
endif

ifeq ($(PLATFORM),vr41xx)
LDFLAGS_mips64   += -EL
VFLAGS += -EL
CFLAGS_vr41xx += -EL -mcpu=r4100 -mips3 -mabi=64 -Wa,-mabi=o64
ASMFLAGS_mips64  += $(CFLAGS_mips64) $(CFLAGS_vr41xx)
endif
